home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / System / DEF / Compile / compile-instrument-p < prev    next >
Text File  |  1998-10-23  |  1KB  |  46 lines

  1. compile-instrument-p path filename instrument &rest instruments
  2.  
  3. compile-instrument-p compiles one or more instruments defined with the class property functions and plays back the MIDI file.
  4.  
  5. In the following example the zone lengths, tonalities, note lengths and velocities are defined for perc and bass instruments. Finally the definitions are compiled with compile-instrument-p and saved into MIDI files. Notice how the tonality zone lengths are defined with def-zone function.
  6.  
  7. (def-tonality
  8.    perc '((c 3 c# 3 d 3 d# 3) (g# 4 a 4 a# 4))
  9.    bass (activate-tonality (blues1 c 4))
  10. )
  11.  
  12. (def-zone 
  13.    perc '(1/1 1/1. 1/1.. 1/1... 1/1....)
  14.    bass '(1/2 1/4 1/8)
  15. )
  16.  
  17. (def-symbol 
  18.    perc '(a b c d e d c b)
  19.    bass '(-a -b -c)
  20. )
  21.  
  22. (def-length 
  23.    perc '(1/32 2/32 3/32 4/32 5/32 6/32 7/32 8/32)
  24.    bass '(123 124 125 126)
  25. )
  26.  
  27. (def-velocity 
  28.    perc '(40 50 60 70)
  29.    bass '(51 99 87 54)
  30. )
  31.  
  32. (def-channel
  33.    perc 1
  34.    perc 2
  35. )
  36.  
  37. (midiport :printer) ; or (midiport :modem)
  38.  
  39. (def-tempo 120)
  40.  
  41. (compile-instrument-p "ccl;output:" "my song"
  42.    perc
  43.    bass
  44. )
  45.  
  46.